package com.example.FindMyFriend;

import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import com.google.android.gms.maps.GoogleMap.InfoWindowAdapter;
import com.google.android.gms.maps.model.Marker;

class CustomAdapter implements InfoWindowAdapter {
  LayoutInflater inflater = null;

  CustomAdapter(LayoutInflater inflater) {
    this.inflater=inflater;
  }

  @Override
  public View getInfoWindow(Marker marker) {
    return(null);
  }

  @Override
  public View getInfoContents(Marker marker) {
    View infoWindow = inflater.inflate(R.layout.popup, null);

    TextView textV=(TextView)infoWindow.findViewById(R.id.title);

    textV.setText(marker.getTitle());
    textV=(TextView)infoWindow.findViewById(R.id.snippet);
    textV.setText(marker.getSnippet());

    return(infoWindow);
  }
}